﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="QuanHuyenManagerForm.aspx.cs" Inherits="WebShoes.Admin.QuanHuyenManagerForm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="panel-heading">    
    <h3 class="panel-title">
    <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
    <b>Danh Sách Quận Huyện</b>
    </h3>
    </div>
<div class="panel-body">
    <a class="btn btn-primary" href="QuanHuyenForm.aspx">
        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> Thêm mới
    </a>
    </br></br>
    <asp:GridView ID="GridView1" runat="server" CssClass="table table-hover" 
        AutoGenerateColumns="False" BorderStyle="None" GridLines="None" 
        onrowcommand="GridView1_RowCommand" 
        onpageindexchanging="GridView1_PageIndexChanging" PageSize="5" AllowPaging="True">
        <Columns>
            <asp:BoundField DataField="MaQuanHuyen" HeaderText="Mã Quận Huyện" 
                ItemStyle-Width="100px" >
<ItemStyle Width="100px"></ItemStyle>
            </asp:BoundField>
            <asp:BoundField DataField="TenQuanHuyen" HeaderText="Tên Quận/Huyện">
            </asp:BoundField>
            <asp:BoundField DataField="TenThanhPho" HeaderText="Tên Thành Phố" />
            <asp:TemplateField HeaderText="#">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" 
                        CommandArgument='<%# Eval("MaQuanHuyen") %>' CommandName="cmdDelete" 
                        OnClientClick="return confirm('Bạn có muốn xóa quận/huyện này không?');" CssClass="btn btn-warning">
                    <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>Xóa
                    </asp:LinkButton>
                    <asp:HyperLink ID="HyperLink1" runat="server" 
                        NavigateUrl='<%# "QuanHuyenForm.aspx?MaQuanHuyen=" +Eval("MaQuanHuyen")%>' CssClass="btn btn-danger">
                        <span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
                        Sửa</asp:HyperLink>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerSettings PageButtonCount="5" />
        <PagerStyle CssClass="~/css/style.css pagination-ys" />

    </asp:GridView>

</div>

</asp:Content>
